home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 July: Mac OS SDK / Dev.CD Jul 00 SDK2.toast / Development Kits / Hardware / PowerManager DDK 1.0f1 / SampleDriver / SampleDriver.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-30  |  2.1 KB  |  71 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        SampleDriver.h
  3.  
  4.     Contains:    Sample code for a PCI device driver that supports PCI power off.
  5.     
  6.                 You may incorporate this sample code into your applications without
  7.                 restriction, though the sample code has been provided "AS IS" and the 
  8.                 responsibility for its operation is 100% yours.  However, what you are 
  9.                 not permitted to do is to redistribute the source as "DSC Sample Code" 
  10.                 after having made changes. If you're going to re-distribute the source, 
  11.                 we require that you make it clear in the source that the code was 
  12.                 descended from Apple Sample Code, but that you've made changes.
  13.  
  14.     Version:    1.0
  15.  
  16.     Copyright:    © 1999 by Apple Computer, Inc., all rights reserved.
  17.  
  18.     File Ownership:
  19.  
  20.         DRI:                xxx put dri here xxx
  21.  
  22.         Other Contact:        xxx put other contact here xxx
  23.  
  24.         Technology:            xxx put technology here xxx
  25.  
  26.     Writers:
  27.  
  28.         (SAJ)    Scott Johnson
  29.         (BB)    Bob Bradley
  30.  
  31.     Change History (most recent first):
  32.  
  33.         <1>     11/30/99    SAJ     Added last four prototypes.
  34.         <0+>     7/11/99    BB        First checked in.
  35. */
  36.  
  37. #pragma once
  38.  
  39. /*==================================================================================================
  40.     Constants
  41. ==================================================================================================*/
  42.  
  43. enum
  44. {
  45.     kDriverMajorVersion                = 0x1,
  46.     kDriverMinorAndBugFixVersion    = 0x00,
  47.     kDriverVersionStage                = developStage,
  48.     kDriverNonReleaseVersion        = 0x1
  49. };
  50.  
  51. /*==================================================================================================
  52.     Prototypes
  53. ==================================================================================================*/
  54.  
  55. OSErr            DoDriverIO( AddressSpaceID         spaceID, 
  56.                             IOCommandID         commandID, 
  57.                             IOCommandContents     contents, 
  58.                             IOCommandCode         code, 
  59.                             IOCommandKind         kind );
  60.  
  61. pascal OSStatus    SampleDriverPowerHandler( UInt32         inMessage, 
  62.                                           void *        ioParam, 
  63.                                           UInt32         inRefCon, 
  64.                                           RegEntryID *    inRegID );
  65.  
  66. Boolean            SampleDriverSupportsPCIPowerOff( void );
  67. Boolean         OurDeviceWokeMachine( void );
  68. OSStatus         CanWeSleepDeviceNow( void );
  69. void             PutOurDeviceToSleep( void );
  70. void             WakeOurDevice( void );
  71.